import { createBrowserRouter, Navigate } from 'react-router-dom';
import React from 'react';

import App from '@/app';
import FullPage from '@/views/demo/fullPage';

// 懒加载
const Home = React.lazy(() => import('@/views/home/home'));
const Profile = React.lazy(() => import('@/views/profile/index'));

const router = createBrowserRouter([
  {
    path: '/',
    element: <Navigate to="/Home"></Navigate>,
  },
  {
    path: '/Home',
    element: <Home></Home>,
  },
  {
    path: '/fullPage',
    element: <FullPage></FullPage>,
  },
  {
    path: '/profile',
    element: <Profile></Profile>,
  },
]);

export default router;
